package cn.iocoder.yudao.module.enterprise.dal.mysql.emissionsource;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.enterprise.dal.dataobject.emissionsource.EmissionGaseDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 排放源和温室气体关联 Mapper
 *
 * @author StevenShen
 */
@Mapper
public interface EmissionGaseMapper extends BaseMapperX<EmissionGaseDO> {

    default List<EmissionGaseDO> selectListByEmissionId(Long emissionId) {
        return selectList(new LambdaQueryWrapperX<EmissionGaseDO>()
                .eq(EmissionGaseDO::getEmissonId, emissionId));
    }

    default void deleteByEmissionId(Long emissionId) {
        delete(new LambdaQueryWrapperX<EmissionGaseDO>()
                .eq(EmissionGaseDO::getEmissonId, emissionId));
    }

}
